package com.cnswhy.cloud.server.iot.config;

import com.cnswhy.cloud.server.iot.filter.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

public class CnswhyAppInteceptorConfigure implements WebMvcConfigurer {
    @Autowired
    LoginInterceptor loginInterceptor;
    /*@Bean
    private LoginInterceptor loginInterceptor(){
        return new LoginInterceptor();
    }*/
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginInterceptor).addPathPatterns("/**/**");
    }

}
